﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using NP.BPMReportPlatform.HR.Dto;
using NP.BPMReportPlatform.RecurringJobs.Dto;
using Volo.Abp.Application.Dtos;

namespace NP.BPMReportPlatform.HR
{
    public interface IHRAppService
    {
        #region BPM审批配置维护
        /// <summary>
        /// 查询数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<GetApproveConfigOutput>> GetAllAsync(GetApproveConfigInput input);

        /// <summary>
        /// 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<GetApproveConfigOutput>> ExportAsync(GetApproveConfigInput input);

        /// <summary>
        /// 导入Excel
        /// </summary>
        /// <param name="bytes"></param>
        /// <param name="operationType"></param>
        /// <returns></returns>
        Task<ImportResultExt<ImportApproveConfigInput>> ImporterExcel(byte[] bytes, string operationType);

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task SaveAsync(SaveApproveConfigInput input);

        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task EditAsync(SaveApproveConfigInput input);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(Guid id);

        Task<List<UserFetch2Dto>> GetHREmployeeApprover(string workNumber);

        /// <summary>
        /// 根据员工号获取员工利益审批人
        /// </summary>
        /// <param name="workNumber"></param>
        /// <returns></returns>
        List<UserFetchDto> GetEmployeeBenefitsApprover(string workNumber);

        /// <summary>
        /// 根据UserId,relationshipType从SFOtherApproveEntity获取RelUserId
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<List<GetSFOtherApproveRelOutput>> GetSFOtherApproveRelUserId(string userId);

        Task<GetUserRegionOutput> GetUserRegionInfo(string sapEmployeeId);

        #endregion

        #region 手机费额度配置维护
        /// <summary>
        /// 查询数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<GetPhoneFeeLimitConfigOutput>> GetAllAsync(GetPhoneFeeLimitConfigInput input);

        /// <summary>
        /// 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<GetPhoneFeeLimitConfigOutput>> ExportAsync(GetPhoneFeeLimitConfigInput input);

        /// <summary>
        /// 导入Excel
        /// </summary>
        /// <param name="bytes"></param>
        /// <param name="operationType"></param>
        /// <returns></returns>
        Task<ImportResultExt<ImportPhoneFeeLimitConfigInput>> ImporterPhoneFeeLimitExcel(byte[] bytes, string operationType);

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task SaveAsync(SavePhoneFeeLimitConfigInput input);

        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task EditAsync(SavePhoneFeeLimitConfigInput input);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeletePhoneFeeLimitConfigAsync(Guid id);

        Task<List<UserLimitDto>> GetPhoneFeeLimitConfigInfo();

        //Task<List<PhoneFeeLimit>> AutoUpdatePhoneFeeLimit();

        #endregion

        #region 交通费额度配置维护
        /// <summary>
        /// 查询数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<GetTrafficFeeLimitConfigOutput>> GetAllAsync(GetTrafficFeeLimitConfigInput input);

        /// <summary>
        /// 导出数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<GetTrafficFeeLimitConfigOutput>> ExportAsync(GetTrafficFeeLimitConfigInput input);

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task SaveAsync(SaveTrafficFeeLimitConfigInput input);

        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task EditAsync(SaveTrafficFeeLimitConfigInput input);

        /// <summary>
        /// 一键同步，推送数据到费控
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<string> PushTrafficFeeLimitAsync(Guid id);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteTrafficFeeLimitConfigAsync(Guid id);

        /// <summary>
        /// 导入Excel
        /// </summary>
        /// <param name="bytes"></param>
        /// <returns></returns>
        Task<ImportResultExt<ImportTrafficFeeLimitConfigInput>> ImporterTrafficFeeLimitExcel(byte[] bytes);

        Task<List<UserLimitDto>> GetTrafficFeeLimitConfigInfo();
        #endregion


        Task<PagedResultDto<GetHRFKXTQZSPOutput>> GetAllAsync(GetHRFKXTQZSPInput input);
        Task<List<GetHRFKXTQZSPOutput>> ExportAsync(GetHRFKXTQZSPInput input);
        /// <summary>
        /// 获取用户数据权限
        /// </summary>
        /// <returns></returns>
        Task<List<string>> GetUserDataPermissions(string EmployeeCode);

        /// <summary>
        /// 获取用户数据权限,提供给ESB接口
        /// </summary>
        /// <returns></returns>
        Task<List<string>> GetUserDataPermissionsForDept(string EmployeeCode);

        /// <summary>
        /// 推送数据到费控
        /// </summary>
        /// <param name="dataList"></param>
        /// <returns></returns>
        Task<string> SyncTrafficFee(List<TrafficFeePushDataDto> dataList);
    }
}